package de.koller.nature.render;

import de.koller.nature.NNode;
import de.koller.oceanFramework.gl.util.ParticleTexture;
import de.koller.oceanFramework.gl.util.TextureUtil;
import org.lwjgl.opengl.GL11;

public class Textures extends NNode {

	public static int PLAIN;

	@Override
	protected void init() {
		super.init();
		ParticleTexture.MAG_FILTER = GL11.GL_NEAREST;
		ParticleTexture plain = ParticleTexture.generate( 32, 32 );
		plain.clear( 0xffffffff );
		
		for( int i = 0; i < 32; i++ ) {
			plain.setPixel( 0xff0000ff, i, 0 );
			plain.setPixel( 0xff0000ff, 0, i );
			plain.setPixel( 0xff0000ff, i, 31 );
			plain.setPixel( 0xff0000ff, 31, i );
		}
			
		plain.flush();
		
		PLAIN = TextureUtil.makeAnisotropic( plain );
		TextureUtil.delete( plain.getTextureID() );
	}
	
}
